package com.anjubao.parking.municipal.parkinglot.mapper;

import com.anjubao.parking.municipal.parkinglot.dto.ParkingStatRecordsResDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingStatRecordsZonesResDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingTrentRecordsResDto;
import com.anjubao.parking.municipal.parkinglot.model.ParkingStatRecord;
import com.anjubao.parking.municipal.parkinglot.model.ParkingStatSlot;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author anjubao
 */
@Mapper
@Repository
public interface ParkingStatRecordMapper extends BaseMapper<ParkingStatRecord> {
    /**
     * 获取当日各类型停车场停车记录总数
     * @param cityId
     * @param type
     * @param startTime
     * @param endTime
     * @return
     */
    List<ParkingStatRecordsResDto> findStatRecords(Integer cityId, Integer type, LocalDateTime startTime, LocalDateTime endTime);

    /**
     *获得当日各区域车流量
     * @param cityId
     * @param districtId
     * @return
     */
    List<ParkingStatRecordsZonesResDto> findZonesRecords(Integer cityId, Integer districtId);


    /**
     * 根据城市id和市区Id统计分时停车场车位趋势
     * @param cityId
     * @param type
     * @return
     */
    List<ParkingTrentRecordsResDto> getParkingTrendRecords(Integer cityId, Integer type, Integer limit);

    /**
     * 获取已用车位和空闲车位
     * @return
     */
    List<ParkingStatSlot> getParkingSlot();

    List<ParkingStatRecord> getParkingEnterRecords();

    List<ParkingStatRecord> getParkingLeaveRecords();
}
